package com.module.overview.ui.cardHistoryDetails

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.asLiveData
import com.common.base.app.extras.set
import com.common.base.app.viewmodel.BaseViewModel
import com.common.base.utils.ViewUtils.getString
import com.module.ble.db.table.UserHeartEntryTime
import com.module.ble.db.table.UserHeartRate
import com.module.ble.repo.HeartEntryTimeRepo
import com.module.ble.repo.HeartRateRepo
import com.module.overview.R

/**
 *
 * 作者：sosou
 *
 * 版本：1.0
 *
 * 创建日期：2025/06/17
 *
 * 描述：卡片信息详情ViewModel
 *
 * 修订历史：
 *
 */
class CardHistoryDetailsViewModel : BaseViewModel() {

//    val allHeartEntryTimeList: LiveData<List<UserHeartEntryTime>> = HeartEntryTimeRepo.instance.findByFieldEqualsOneQueryFlowRo(arrayOf("hasHeartRate", "hasBloodOxygen", "hasBodyTemperature")).asLiveData()
    var allHeartEntryTimeList: LiveData<List<UserHeartEntryTime>>? = null

    var fieldNames: Array<String> = arrayOf("hasHeartRate", "hasBloodOxygen", "hasBodyTemperature")

    init {
    }

    fun initFindByFieldEqualsOneQueryFlowRo() {
        allHeartEntryTimeList = HeartEntryTimeRepo.instance.findByFieldEqualsOneQueryFlowRo(fieldNames).asLiveData()
    }
}